﻿using System;
using System.Data;

namespace Data.Model
{
    public class businesscount
    {
        public string businessname { get; set; }
        public int count { get; set; }
        public bool TranByConstructFlag { get; set; }

        public businesscount(DataRow dataRow)
        {
            TranByConstructFlag = false;
            if (dataRow != null)
            {
                try
                {
                    this.businessname = dataRow["businessname"] is DBNull ? string.Empty : Convert.ToString(dataRow["businessname"]);
                    this.count = dataRow["bcount"] is DBNull ? 0 : Convert.ToInt32(dataRow["bcount"]);
                }
                catch (Exception) { this.TranByConstructFlag = false; }
            }
        }
    }
}
